Document PEP 698 and other new typing features in What's New#104957
Document PEP 698 and other new typing features in What's New#104957hauntsaninja merged 3 commits intopython:mainfrom
Conversation
| Waygood in :gh:`74690` and :gh:`103193`.) | ||
|
|
||
| * All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have the | ||
| ``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco in |
There was a problem hiding this comment.
Given that this attribute is undocumented (and I'd prefer it to stay that way, though that's not a strong opinion), could we add this something like "this ensures that types.get_original_bases(typeddict_class) will now always return the correct result"?
There was a problem hiding this comment.
Maybe we could say "now work reliably with :func:types.get_original_bases", although that's a bit of a vacuous statement as types.get_original_bases didn't exist before 3.12 :)
There was a problem hiding this comment.
Eh, I guess you're right, it's probably fine as it is
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
stroxler
left a comment
There was a problem hiding this comment.
The PEP 698 section looks good to me, thanks!
|
Thanks @JelleZijlstra for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
|
GH-105045 is a backport of this pull request to the 3.12 branch. |
|
|
||
| from typing import override | ||
|
|
||
| class Base: |
There was a problem hiding this comment.
4 space tab would be more consistent.
cc @stroxler
📚 Documentation preview 📚: https://cpython-previews--104957.org.readthedocs.build/